<!doctype html>
<html>
   <head>
      <title>动态搜索</title>
      <meta charset="utf-8"/>
      <script type="text/javascript" src="scripts/jquery.min.js"></script>
      <script type="text/javascript">
        $(function(){
        	$("#searchBtn").click(function(){
        		var title=$("#title").val().trim();
        		var status=$("#status").val();
        		var begin=$("#begin").val().trim();
        		var end=$("#end").val().trim();
        		$.ajax({
        			url:"http://localhost:8088/cloud_note/note/hightSearch.do",
        			type:"post",
        			data:{"title":title,"status":status,"begin":begin,"end":end},
        			dataType:"json",
        			success:function(result){
        				if(result.status==0){
        					$("#note_list").empty();
        					var notes=result.data;
        					for(var i=0;i<notes.length;i++){
        						var noteId=notes[i].cn_note_id;
        						var noteTitle=notes[i].cn_note_title;
        						var createTime=notes[i].cn_note_create_time;
        						var s_tr="<tr><td>"+noteId+"</td><td>"+noteTitle+"</td><td>"+createTime+"</td></tr>";
        						$("#note_list").append(s_tr);
        					}
        				}
        			}
        		});
        	});
        });
      </script>
   </head>
   <body>
     标题:<input type="text" id="title"></br>    
     状态:<select id="status">
       <option value="0">全部</option>
       <option value="1">正常</option>
       <option value="2">删除</option>
      </select></br>    
     开始日期：<input type="text" id="begin"></br>
     结束日期：<input type="text" id="end"></br>
          <input type="button" id="searchBtn" value="搜索"></br>
           <hr/>
     结果列表：
     <table id="note_list" border="2px solid red" color="orange">
        <tr>
          <td>笔记本Id</td>
          <td>笔记本名</td>
          <td>创建时间</td>
        </tr>
     </table>
   </body>
</html>
